blob: 27afd85966e0052e108d08d70356c92ea8a37463 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
import * as React from "react"
import { getServerSession } from "next-auth/next"
import { authOptions } from "@/app/api/auth/[...nextauth]/route"
import { Shell } from "@/components/shell"
import { getVendorContractReviews } from "@/lib/general-contracts/service"
import { VendorGeneralContractReviewTable } from "./vendor-general-contract-review-table"
import { InformationButton } from "@/components/information/information-button"
import { unstable_noStore as noStore } from 'next/cache'
export default async function VendorGeneralContractReviewPage() {
noStore()
const session = await getServerSession(authOptions)
if (!session?.user?.companyId) {
return (
<div className="flex h-full items-center justify-center p-6">
정상적인 벤더에 소속된 계정이 아닙니다.
</div>
)
}
const vendorId = session.user.companyId
// 데이터 가져오기
const contractReviews = await getVendorContractReviews(vendorId, 1, 100, '')
return (
<Shell className="gap-6">
<div className="flex items-center justify-between">
<div>
<div className="flex items-center gap-2">
<h2 className="text-2xl font-bold tracking-tight">
일반계약 조건검토
</h2>
<InformationButton pagePath="partners/general-contract-review" />
</div>
<p className="text-muted-foreground">
조건검토 요청된 계약 목록을 확인하고 검토합니다.
</p>
</div>
</div>
<VendorGeneralContractReviewTable data={contractReviews.data} />
</Shell>
)
}
|